package com.project.bookstore.order.mapper;
import com.project.bookstore.order.domain.Order;
import com.project.bookstore.order.pojo.CountStateEntity;

import com.project.bookstore.order.pojo.OrderDetailDO;
import com.project.bookstore.order.pojo.OrderMultiConditionDTO;
import com.project.bookstore.order.pojo.OrderMultiConditionVO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface OrderMapper {
    /**
     * 多条件查询订单
     * @param userId 用户ID
     * @param condition 查询条件
     * @return 订单们
     */
    List<OrderDetailDO> multiCondition(Long userId , OrderMultiConditionDTO condition);

    /**
     * 根据用户ID统计该用户所有订单状态
     * @param userId 用户ID
     * @return 订单状态列表
     */
    List<CountStateEntity> countState(Long userId);

    /**
     * 批量插入订单数据
     * @param orders
     * @return
     */
    int multiInsert(List<Order> orders);
}
